package co.fitstart.entity.course.round;

import com.demo2do.core.utils.Alias;

@Alias("roundCoursewareStatus")
public enum RoundCoursewareStatus {
    
    GROUPING("grouping", "待分组"),
    
    EDITING("editing", "编辑中"),
    
    FINISH("finish", "已完成");
    
    private String alias;
    
    private String description;
    
    /**
     * @param alias
     * @param description
     */
    private RoundCoursewareStatus(String alias, String description) {
        this.alias = alias;
        this.description = description;
    }

    /**
     * 
     * @param alias
     * @return
     */
    public static RoundCoursewareStatus aliasOf(String alias) {
        for (RoundCoursewareStatus onlineRoundGroupStatus : RoundCoursewareStatus.values()) {
            if (onlineRoundGroupStatus.getAlias().equalsIgnoreCase(alias)) {
                return onlineRoundGroupStatus;
            }
        }
        
        return null;
    }
    
    /**
     * 
     * @return
     */
    public boolean isGrouping() {
        return this.equals(GROUPING);
    }
    
    /**
     * @return
     */
    public boolean isEditing() {
        return this.equals(EDITING);
    }
    
    /**
     * @return
     */
    public boolean isFinish() {
        return this.equals(FINISH);
    }

    /**
     * @return the alias
     */
    public String getAlias() {
        return alias;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }
    
}
